import axios from '@/utils/axios'

export const getDocVO = (id: string): Promise<ApiResult<DevelopmentDocVO>> => {
    return axios.get(`development/doc/${id}`)
}

export const getDocPage = (pagination: Pagination, params: DevelopmentDoc): Promise<ApiResult<Page<DevelopmentDoc>>> => {
    return axios.get(`development/doc/page/${pagination.page}/${pagination.pageSize}`, { params })
}

export const postOrPutDocVO = (data: DevelopmentDocVO): Promise<ApiResult<null>> => {
    return axios.post(`development/doc`, data)
}

export const deleteDocVO = (id: string): Promise<ApiResult<null>> => {
    return axios.delete(`development/doc/${id}`)
}
